<?php
namespace app\common\model\mysql;
use think\Model;
class Demo extends Model
{
	public function getDemoDataByCatId($cat_id,$limit=10){
		if(empty($cat_id)){
			return [];
		}

		$result = $this->where('cat_id',$cat_id)
			->limit(10)->order('id','desc')
			->select()->toArray();
		
		return $result;
	}
}